<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        // null undefined
        // 
        // 表示引用类型
        let config = null;
        // 表示基本数据类型
        let web = undefined;

        // 函数返回值
        function show() {
            // 默认返回undefined
        }
        console.log(show());

        // typeof
        let a = 324;
        let b;
        console.log(typeof a);
        console.log(typeof b);

        function star(num) {
            num = num || 5;
            // if(undefined == num){
            //     num = 5;
            // }
            for (let i = 0; i < num; i++) {
                document.write("*");
            }
            document.writeln();
        }
        star();
        star(3);

    </script>
</body>

</html>